<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="include.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="title.signUpUser" /></title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/<spring:theme code="css"/>" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/<spring:url value="public-resources/js/bootstrap.js" />"></script>
</head>
 
<body>
	<%@ include file="header.jsp" %>
	<div class="container-fluid">
		<div class="page-header">
			<h2>User edit</h2>		
		</div>
		<form:form method="POST" cssClass="form-horizontal" commandName="user"
			action="${pageContext.request.contextPath}/user/update">
			<form:hidden path="id"/>
			<form:errors path="*" cssClass="alert alert-error" element="div" />
			<div class="control-group">
				<label class="control-label"><spring:message code="label.username" /></label>
				<div class="controls">
					<form:input path="username"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="label.email" /></label>
				<div class="controls">
					<form:input path="email"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="label.firstName" /></label>
				<div class="controls">
					<form:input path="firstName"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="label.lastName" /></label>
				<div class="controls">
					<form:input path="lastName"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="label.phoneNumber" /></label>
				<div class="controls">
					<form:input path="phoneNumber"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Enter current password</label>
				<div class="controls">
					<form:password path="password" />
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<input class="btn" type="submit" value="<spring:message code="button.save" />" />
					<a class="btn" href="${pageContext.request.contextPath}/user">Back</a>
				</div>
			</div>
		</form:form>
	</div>
	<%@ include file="footer.jsp" %>
</body>
</html>